package com.example.myweb.Dto;

import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
public class ArticleUpdateDTO {

    @NotEmpty(message = "文章标题不能为空")
    @Size(max = 30, message = "文章标题不能超过30个字符")
    private String title;

    @NotEmpty(message = "文章内容不能为空")
    private String content;

    private String coverImageUrl;

    @NotNull(message = "必须指定文章分类")
    private Integer categoryId;
}